package cn.signUpSystem.util;

import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Properties;

/**
 * 配置文件读取工具类
 * 
 * @author ASUS
 * 
 */
public class PropUtil {

	public static String parsePropFile(String fileName, Integer id) {
		String path = null;
		InputStream ins = null;
		Properties properties = null;
		try {
			path = PropUtil.class.getClassLoader().getResource("/").getPath()
					+ fileName;
			ins = new FileInputStream(path);
			properties = new Properties();
			properties.load(ins);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			if (ins != null) {
				try {
					ins.close();
					ins = null;
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
			ins = null;
		}
		return properties.getProperty(Integer.toString(id));
	}

}
